package homework.work5;

public class SouthPerson extends Person {
    double salary=10000;

    //get and set
    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    //行为
    @Override
    public void eat() {
        System.out.println("Southerners like to eat rice");
    }

    public void swim() {
        System.out.println("southperson swim");
    }

    //构造器
    public SouthPerson() {
    }

    public SouthPerson(double salary) {
        this.salary = salary;
    }
}
